<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<%@ include file="./../../header_inc.jsp"%>
<script type="text/javascript">
	//所有的子窗体都需要有一个save函数，当点击弹出窗体的保存按钮时所进行的操作

	function btnSave_click() {
			var fun_ret;
			var vals = $('#formModule').serialize();
			var url = '${saveUrl}';
			var formData = new FormData($('#formModule')[0]);
			$.ajax({
				async : false,
				type : "POST",
				url : url,
				data : formData,
				cache : false,
				contentType : false,
				processData : false,
				dataType : 'json',
				xhr : function() { // custom xhr
					myXhr = $.ajaxSettings.xhr();
					if (myXhr.upload) { // if upload property exists
						myXhr.upload.addEventListener('progress',
								progressHandlingFunction, false); // progressbar
					}
					return myXhr;

				},
				//Ajax events
				success : function(data) {
		               if(data.success == 0 )
		               {
		            	   fun_ret = true;
		               }
		               else
		               {
		            	   top.Ext.Msg.alert("返回提示",data.msg);
		               }
		           },
				error : errorHandler = function(data) {
					$.messager.alert("错误提示", data.msg);
					return false;
				}
			});
			return fun_ret;
	}
	
	function progressHandlingFunction(e) {
		if (e.lengthComputable) {
			$('progress').attr({
				value : e.loaded,
				max : e.total
			});
		}
	}
	
	
</script>
</head>
<body>
<!-- 只添加一些模板数据，因为客户由前台注册增加 -->
<div style="padding: 1px" align="center">
	
		<form id="formModule" method="post" >
			<table border="0">
				<tr height="0">
					<td><c:if test="${!empty model.arcitleId }"><input type="hidden" value="${model.arcitleId }" name="arcitleId"></input></c:if></td>
				</tr>
				<tr height="30">
					<td>物品状态：</td>
					<td>
						<c:if test="${model.status!=9  }">
							<select class="easyui-validatebox" name="status" style="width: 180px;height: 25px;text-align:center">
      							<option value="0" selected="selected">已处理</option>
      							<option value="9">未处理</option>
                			</select>
						</c:if>
						<c:if test="${model.status==9  }">
							<select class="easyui-validatebox" name="status" style="width: 180px;height: 25px;text-align:center">
      							<option value="0">已处理</option>
      							<option value="9" selected="selected">未处理</option>
                			</select>
						</c:if>
					</td>
				</tr>
				
				<tr height="30">
					<td>物品标示：</td>
					<td>
						<c:if test="${model.mark!=1  }">
							<select class="easyui-validatebox" name="mark" style="width: 180px;height: 25px;text-align:center">
      							<option value="0" selected="selected">我丢失</option>
      							<option value="9">我捡到</option>
                			</select>
						</c:if>
						<c:if test="${model.mark==1  }">
							<select class="easyui-validatebox" name="mark" style="width: 180px;height: 25px;text-align:center">
      							<option value="0">我丢失</option>
      							<option value="9" selected="selected">我捡到</option>
                			</select>
						</c:if>
					</td>
				</tr>
				<tr height="30">
					<td>学校：</td>
					<td>
						<select class="easyui-validatebox" name="sysDepartment.depId" style="width: 180px;height: 25px;text-align:center">
                				<option value="${model.sysDepartment.depId }" selected="selected">${model.sysDepartment.depName }</option>
                				<c:forEach var="sharedUser" items="${dep }">
                					
      								<option value="${sharedUser.depId }">${sharedUser.depName}</option>
      							</c:forEach>
                		</select>
					</td>
				</tr>
				<tr height="30">
					<td>物品名称：</td>
					<td><input id="arcitleName" maxlength="10" placeholder="请输入名称"
						class="easyui-validatebox textbox" type="text" 
						name="arcitleName" data-options="required:true"
						style="width: 180px;height: 25px;text-align:center" value="${model.arcitleName }"></input></td>
				</tr>
				<tr height="30">
					<td>物品信息：</td>
					<td><input id="iteminform" maxlength="140" placeholder="请输入物品信息"
						class="easyui-validatebox textbox" type="text"
						name="iteminform" data-options="required:true"
						style="width: 180px;height: 25px;text-align:center" value="${model.iteminform }"></input></td>
				</tr>
				<tr height="30">
					<td>联系人：</td>
					<td><input id="contactPerson" maxlength="20" placeholder="请输入联系人"
						class="easyui-validatebox textbox" type="text"
						name="contactPerson" data-options="required:true"
						style="width: 180px;height: 25px;text-align:center" value="${model.contactPerson }"></input></td>
				</tr>
				<tr height="30">
					<td>联系电话：</td>
					<td><input id="contactPhone" maxlength="20" placeholder="请输入联系电话"
						class="easyui-validatebox textbox" type="text"
						name="contactPhone" data-options="required:true"
						style="width: 180px;height: 25px;text-align:center" value="${model.contactPhone }"></input></td>
				</tr>
			
				<tr>
                    <td height="28">物品图片：</td>
                    <td><input type="file" class="easyui-linkbutton"
						data-options="toggle:true,group:'g2',plain:true"
						accept="image/*" id="uploadFile"
						name="uploadFile" style="width: 200px;" value="${model.lafIcon }"/></td>
                </tr>
		
			
				
				
			</table>
		</form>
	</div>
</body>
</html>
